home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / autoconf.lha / autoconf-1.4 / autoconf.info (.txt) < prev    next >
GNU Info File  |  1993-05-15  |  92KB  |  1,784 lines

  1. This is Info file autoconf.info, produced by Makeinfo-1.54 from the
  2. input file ./autoconf.texi.
  3.    This file documents the GNU Autoconf package for creating scripts to
  4. configure source code packages using templates and an `m4' macro
  5. package.
  6.    Copyright (C) 1992, 1993 Free Software Foundation, Inc.
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided that
  12. the entire resulting derived work is distributed under the terms of a
  13. permission notice identical to this one.
  14.    Permission is granted to copy and distribute translations of this
  15. manual into another language, under the above conditions for modified
  16. versions, except that this permission notice may be stated in a
  17. translation approved by the Foundation.
  18. File: autoconf.info,  Node: Top,  Next: Introduction,  Up: (dir)
  19.    This file documents the GNU Autoconf package for creating scripts to
  20. configure source code packages using templates and an `m4' macro
  21. package.
  22. * Menu:
  23. * Introduction::        Autoconf's purpose, strengths, and weaknesses.
  24. * Distributing::        Legal restrictions on Autoconf output.
  25. * Making configure Scripts::    How to organize and produce Autoconf scripts.
  26. * Specific Tests::        Macros that check for particular features.
  27. * General Purpose Macros::    Macros that check for kinds of features.
  28. * Writing Macros::        How to add your own macros to Autoconf.
  29. * Makefiles::            Information Autoconf uses in `Makefile's.
  30. * Running configure Scripts::    How to use the Autoconf output.
  31. * Example::            Sample Autoconf input files.
  32. * Preprocessor Symbol Index::    Index of C preprocessor symbols defined.
  33. * Macro Index::            Index of Autoconf macros.
  34. File: autoconf.info,  Node: Introduction,  Next: Distributing,  Prev: Top,  Up: Top
  35. Introduction
  36. ************
  37.    Autoconf is a tool for producing shell scripts that automatically
  38. configure software source code packages to adapt to many kinds of
  39. UNIX-like systems.  For each software package that Autoconf is used
  40. with, it creates a configuration script from a template file that lists
  41. the operating system features that the package can use.
  42.    The configuration scripts produced by Autoconf normally require no
  43. manual user intervention when run; they do not even take an argument
  44. specifying the system type.  Instead, they test for the presence of each
  45. feature that might be needed individually (after printing a one-line
  46. message stating what they are checking for, so the user doesn't get too
  47. bored while waiting for the script to finish).  As a result, they deal
  48. well with systems that are hybrids or customized from the more common
  49. UNIX variants.  There is no need to maintain files that list the
  50. features supported by each release of each variant of UNIX, except for
  51. occasional quirks.
  52.    After the shell code needed to recognize and respond to an operating
  53. system feature has been written, Autoconf allows it to be shared between
  54. many software packages that can use (or need) that feature.  If it later
  55. turns out that the shell code needs adjustment for some reason, it needs
  56. to be changed in only one place; all of the the configuration scripts
  57. can be regenerated automatically to take advantage of the updated code.
  58.    Autoconf was developed for configuring packages of small utilities;
  59. it might not be able to deduce all of the information needed to
  60. configure programs with more specialized needs.  Larry Wall's
  61. Metaconfig package is similar in purpose to Autoconf, but is more
  62. general; the scripts it produces are hairier and require manual user
  63. intervention, which is quite inconvenient when configuring large source
  64. trees.
  65.    Unlike Metaconfig scripts, Autoconf scripts can support
  66. cross-compiling if some care is taken in writing them.  They should
  67. avoid executing test programs, since test programs compiled with a
  68. cross-compiler can not be executed on the host system.  Also, they
  69. shouldn't do anything that tests features of the host system instead of
  70. the target system.
  71.    Autoconf imposes some restrictions on the names of macros used with
  72. `#ifdef' in C programs (*note Preprocessor Symbol Index::.).
  73.    Autoconf was written by David MacKenzie, with help from Franc,ois
  74. Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, and Roland
  75. McGrath.  It was inspired by Brian Fox's automatic configuration system
  76. for BASH, by Larry Wall's Metaconfig, and by Richard Stallman, Richard
  77. Pixley, and John Gilmore's configuration tools for the GNU compiler and
  78. object file utilities.
  79. File: autoconf.info,  Node: Distributing,  Next: Making configure Scripts,  Prev: Introduction,  Up: Top
  80. Distributing Autoconf Output
  81. ****************************
  82.    The configuration scripts that Autoconf produces are covered by the
  83. GNU General Public License.  This is because they consist almost
  84. entirely of parts of Autoconf itself, rearranged somewhat, and Autoconf
  85. is distributed under the terms of the GPL.  However, programs that use
  86. Autoconf scripts to configure themselves do not automatically come under
  87. the GPL.  Distributing an Autoconf configuration script as part of a
  88. program is considered to be *mere aggregation* of that work with the
  89. Autoconf script.  Such programs are not derivative works based on
  90. Autoconf; only their configuration scripts are.  We still encourage
  91. software authors to distribute their work under terms like those of the
  92. GPL, but doing so is not required to use Autoconf.
  93. File: autoconf.info,  Node: Making configure Scripts,  Next: Specific Tests,  Prev: Distributing,  Up: Top
  94. Making `configure' Scripts
  95. **************************
  96.    The configuration scripts that Autoconf produces are by convention
  97. called `configure' when they are distributed.  When run, they create
  98. several files:
  99.    * one or more `Makefile' files (one in each subdirectory of the
  100.      package), from template `Makefile.in' files (*note Makefiles::.);
  101.    * optionally, a C header file, the name of which is configurable,
  102.      containing `#define' statements;
  103.    * a shell script called `config.status' that, when run, will recreate
  104.      the current configuration parameter settings.
  105.    To create a `configure' script with Autoconf, you need to write an
  106. Autoconf input file and run Autoconf on it to produce the script.  And,
  107. of course, test the resulting script.
  108.    Here is a diagram showing how the files that can be used in
  109. configuration are produced:
  110.      acgeneral.m4 \                          Makefile.in \
  111.      acspecific.m4 \                                      \
  112.      autoconf*     -> m4* -> configure* -> config.status* -> Makefile \
  113.      configure.in  /                          |    |                   \
  114.        |    |                                 |    |             make* -> your
  115.        |    |                                 |    |                   /package
  116.        |    |                              config.status* -> config.h /
  117.      configure.in \                                       /
  118.      autoheader*  ->  - - - - - - - - - - -> config.h.in /
  119.      acconfig.h   /
  120. Executables are suffixed by `*', while files appearing twice are linked
  121. with lines of `|'.
  122. * Menu:
  123. * Writing configure.in::    What to put in an Autoconf input file.
  124. * Invoking autoconf::        How to create configuration scripts.
  125. * Invoking autoheader::        How to create configuration header files.
  126. File: autoconf.info,  Node: Writing configure.in,  Next: Invoking autoconf,  Up: Making configure Scripts
  127. Writing `configure.in'
  128. ======================
  129.    To produce a `configure' script for a software package, create a
  130. file called `configure.in' that contains invocations of the Autoconf
  131. macros that test the system features your package needs or can use.
  132. Autoconf macros already exist to check for many features; see *Note
  133. Specific Tests::, for their descriptions.  For most other features, you
  134. can use Autoconf template macros to produce custom checks; see *Note
  135. General Tests::, for information about them.  For especially tricky or
  136. specialized features, `configure.in' might need to contain some
  137. hand-crafted shell commands.  *Note Writing Macros::, for guidelines on
  138. writing tests from scratch.
  139.    Every `configure.in' must begin with a call to `AC_INIT' and end
  140. with a call to `AC_OUTPUT' (*note Setup::.).  Other than that, the
  141. order in which `configure.in' calls the Autoconf macros is generally
  142. not important, except that some macros rely on other macros having been
  143. called first, because they check previously set values of some
  144. variables to decide what to do.  These macros are noted in the
  145. individual descriptions (*note Specific Tests::.).
  146.    To encourage consistency, here is a suggested order for calling the
  147. Autoconf macros.  A few macros need to be called in a different order
  148. from the one given here; they are noted in their individual descriptions
  149. (*note Specific Tests::.).  (Note that there must not be any space
  150. between the macro name and the open parentheses.)
  151.      `AC_INIT(FILE)'
  152.      checks for programs
  153.      checks for UNIX variants that set `DEFS'
  154.      checks for header files
  155.      checks for typedefs
  156.      checks for functions
  157.      checks for structure members
  158.      checks for compiler characteristics
  159.      checks for operating system services
  160.      other checks for UNIX variants
  161.      `AC_OUTPUT([FILE...])'
  162.    You can include comments in `configure.in' files by starting them
  163. with the `m4' predefined macro `dnl', which discards text up through
  164. the next newline.  These comments do not appear in the generated
  165. `configure' scripts.  For example, it is helpful to begin
  166. `configure.in' files with a line like this:
  167.      dnl Process this file with autoconf to produce a configure script.
  168.    *Note Sample configure.in::, for an example of a real `configure.in'
  169. script.
  170. File: autoconf.info,  Node: Invoking autoconf,  Next: Invoking autoheader,  Prev: Writing configure.in,  Up: Making configure Scripts
  171. Invoking `autoconf'
  172. ===================
  173.    To create `configure' from `configure.in', run the `autoconf'
  174. program with no arguments.  `autoconf' processes `configure.in' with
  175. the `m4' macro processor, using the Autoconf macros.  If you give
  176. `autoconf' an argument, it reads that file instead of `configure.in'
  177. and writes the configuration script to the standard output instead of
  178. to `configure'.  If you give `autoconf' the argument `-', it reads the
  179. standard input instead of `configure.in' and writes the configuration
  180. script on the standard output.
  181.    The Autoconf macros are defined in two or more files.  Two of the
  182. files are distributed with Autoconf: `acgeneral.m4' (*note General
  183. Purpose Macros::.) and `acspecific.m4' (*note Specific Tests::.).
  184. `autoconf' also looks for an optional file called `aclocal.m4' both in
  185. the directory that contains other installed Autoconf macro files and in
  186. the current directory.  (If both files exist, it uses both of them.)
  187. Those files can contain your site's own locally written Autoconf macro
  188. definitions.  *Note Writing Macros::, for more information.
  189.    You can override the location where `autoconf' looks for the
  190. installed macro files by setting the `AC_MACRODIR' environment variable
  191. to the appropriate value.  You can also use the `--macrodir' option
  192. (which has higher precedence than the value of `AC_MACRODIR').
  193.    Autoconf requires GNU `m4'.  It uses features that some UNIX
  194. versions of `m4' do not have; it is also reported to overflow internal
  195. limits of some versions of `m4'.
  196.    Autoconf does not work well with GNU C library releases before 1.06.
  197. The GNU C library contains stubs (which always return an error) for
  198. functions that are not available instead of omitting them from the
  199. library.  As a result, Autoconf scripts are fooled into thinking that
  200. those functions are available.  This problem does not exist with
  201. releases 1.06 and later of the GNU C library, which define C
  202. preprocessor macros that the Autoconf macro `AC_FUNC_CHECK' tests,
  203. indicating that certain functions are stubs (*note General Tests::., for
  204. more information on checking for functions).
  205. File: autoconf.info,  Node: Invoking autoheader,  Prev: Invoking autoconf,  Up: Making configure Scripts
  206. Invoking `autoheader'
  207. =====================
  208.    You can use the program `autoheader' to create a template file of C
  209. `#define' statements for `configure' to use.  By default, the file that
  210. `autoheader' creates is called `config.h.in'.  `autoheader' scans
  211. `configure.in' and figures out which C preprocessor symbols it might
  212. define.  It copies comments and `#define' and `#undef' statements from
  213. a file called `acconfig.h', which comes with Autoconf; it also uses a
  214. file called `acconfig.h' in the current directory, if present.  For
  215. symbols that `AC_HAVE_HEADERS' or `AC_HAVE_FUNCS' define, `autoheader'
  216. generates comments itself rather than copying them from a file, since
  217. the possible symbols are effectively limitless.
  218.    If you give `autoheader' an argument, it uses that file instead of
  219. `configure.in' and writes the header file to the standard output
  220. instead of to `config.h.in'.  If you give `autoheader' an argument of
  221. `-', it reads the standard input instead of `configure.in' and writes
  222. the header file to the standard output.
  223.    You can override the location where `autoheader' looks for the
  224. installed macro and `acconfig.h' files by setting the `AC_MACRODIR'
  225. environment variable to the appropriate value.  You can also use the
  226. `--macrodir' option (which has higher precedence than the value of
  227. `AC_MACRODIR').
  228. File: autoconf.info,  Node: Specific Tests,  Next: General Purpose Macros,  Prev: Making configure Scripts,  Up: Top
  229. Specific Tests
  230. **************
  231.    These macros test for particular operating system features that
  232. packages might need or want to use.  If you need to test for a feature
  233. that none of these macros check for, you can probably do it by calling
  234. one of the general purpose test macros with appropriate arguments
  235. (*note General Tests::.).
  236.    All of these macros that set `make' variables call `AC_SUBST' on
  237. those variables (*note Setting Variables::., for details about
  238. `AC_SUBST').  The phrase "define NAME" is used below as a shorthand to
  239. mean either add `-DNAME=1' to the `make' variable `DEFS', or put
  240. `#define NAME 1' in the configuration header file, depending on whether
  241. `AC_CONFIG_HEADER' has been called.  *Note Setting Variables::, for
  242. more information.
  243.    Within each section below, the macros are listed in alphabetical
  244. order.  The macros are generally named for the `make' variables or C
  245. preprocessor macros that they define; those names are based largely on
  246. what existing GNU programs use.  These macros are defined in the file
  247. `acspecific.m4'.
  248. * Menu:
  249. * Alternative Programs::    Selecting between alternative programs.
  250. * Header Files::        Header files that might be missing.
  251. * Typedefs::            `typedef's that might be missing.
  252. * Library Functions::        C library functions that might be missing.
  253. * Structures::            Structures or members that might be missing.
  254. * Compiler Characteristics::    C compiler or machine architecture features.
  255. * System Services::        Operating system services.
  256. * UNIX Variants::        Special cases for specific UNIX variants.
  257. File: autoconf.info,  Node: Alternative Programs,  Next: Header Files,  Up: Specific Tests
  258. Alternative Programs
  259. ====================
  260.    The following macros check for the presence or behavior of particular
  261. programs:
  262. `AC_DECLARE_YYTEXT'
  263.      Define `DECLARE_YYTEXT' to declare `yytext' appropriately,
  264.      depending on whether `lex' or `flex' is being used.  This macro
  265.      calls `AC_PROG_CPP' and `AC_PROG_LEX' if they haven't been called
  266.      already.
  267. `AC_LN_S'
  268.      If `ln -s' works on the current filesystem (the O.S. and filesystem
  269.      support symbolic links), set shell and `make' variable `LN_S' to
  270.      `ln -s', otherwise set it to `ln'.
  271. `AC_MINUS_C_MINUS_O'
  272.      If the C compiler does not accept the `-c' and `-o' options
  273.      simultaneously, define `NO_MINUS_C_MINUS_O'.
  274. `AC_PROG_YACC'
  275.      If `bison' is found, set `make' variable `YACC' to `bison -y'.
  276.      Otherwise, if `byacc' is found, set `YACC' to `byacc'.  Otherwise
  277.      set `YACC' to `yacc'.
  278. `AC_PROG_CPP'
  279.      Set shell and `make' variable `CPP' to a command that runs the C
  280.      preprocessor.  If `$CC -E' doesn't work, it uses `/lib/cpp'.
  281.      Many of the specific test macros use the value of `CPP' indirectly
  282.      by calling `AC_TEST_CPP', `AC_HEADER_CHECK', `AC_HEADER_EGREP', or
  283.      `AC_PROGRAM_EGREP'.  Those macros call this macro first if it
  284.      hasn't been called already.  It should be called after
  285.      `AC_PROG_CC'.
  286. `AC_PROG_LEX'
  287.      If `flex' is found, set `make' variable `LEX' to `flex' and
  288.      `LEXLIB' to `-lfl' (or the full pathname of the `fl' library, if
  289.      it is in a standard place).  Otherwise set `LEX' to `lex' and
  290.      `LEXLIB' to `-ll'.
  291. `AC_PROG_AWK'
  292.      Check for `mawk', `gawk', `nawk', and `awk', in that order, and
  293.      set `make' variable `AWK' to the first one that it finds.
  294. `AC_PROG_CC'
  295.      If `gcc' is found, set `make' variable `CC' to `gcc', and set
  296.      shell variable `GCC' to 1 for use by macros such as
  297.      `AC_GCC_TRADITIONAL'.
  298. `AC_GCC_TRADITIONAL'
  299.      Add `-traditional' to `make' variable `CC' if using the GNU C
  300.      compiler and `ioctl' does not work properly without
  301.      `-traditional'.  This macro calls `AC_PROG_CC' and `AC_PROG_CPP'
  302.      if they haven't been called already.
  303. `AC_PROG_INSTALL'
  304.      Set `make' variable `INSTALL_PROGRAM' to `install -c' and the
  305.      variable `INSTALL_DATA' to `install -c -m 644' if `install' is
  306.      found, otherwise set both to `cp'.  Screens out the false matches
  307.      `/etc/install' and `/usr/sbin/install' (shell scripts found on
  308.      System V).
  309. `AC_PROG_RANLIB'
  310.      Set `make' variable `RANLIB' to `ranlib' if `ranlib' is found,
  311.      otherwise to `:' (do nothing).
  312. `AC_RSH'
  313.      If a remote shell is available, put `rtapelib.o' in `make'
  314.      variable `RTAPELIB'.  Otherwise, also do so if `netdb.h' exists
  315.      (implying the `rexec' function), and in addition define
  316.      `HAVE_NETDB_H'.  If neither a remote shell nor `rexec' is
  317.      available, define `NO_REMOTE'.
  318. File: autoconf.info,  Node: Header Files,  Next: Typedefs,  Prev: Alternative Programs,  Up: Specific Tests
  319. Header Files
  320. ============
  321.    The following macros check for the presence of certain C header
  322. files:
  323. `AC_DIR_HEADER'
  324.      If the system has `dirent.h', define `DIRENT'; otherwise, if it
  325.      has `sys/ndir.h', define `SYSNDIR'; otherwise, if it has
  326.      `sys/dir.h', define `SYSDIR'; otherwise, if it has `ndir.h',
  327.      define `NDIR'.  Also, if the directory library header file
  328.      contains a declaration of the `closedir' function with a `void'
  329.      return type, define `VOID_CLOSEDIR'.  The directory library
  330.      declarations in the source code should look something like the
  331.      following:
  332.           /* unistd.h defines _POSIX_VERSION on POSIX.1 systems.  */
  333.           #if defined(DIRENT) || defined(_POSIX_VERSION)
  334.           #include <dirent.h>
  335.           #define NLENGTH(dirent) (strlen((dirent)->d_name))
  336.           #else /* not (DIRENT or _POSIX_VERSION) */
  337.           #define dirent direct
  338.           #define NLENGTH(dirent) ((dirent)->d_namlen)
  339.           #ifdef SYSNDIR
  340.           #include <sys/ndir.h>
  341.           #endif /* SYSNDIR */
  342.           #ifdef SYSDIR
  343.           #include <sys/dir.h>
  344.           #endif /* SYSDIR */
  345.           #ifdef NDIR
  346.           #include <ndir.h>
  347.           #endif /* NDIR */
  348.           #endif /* not (DIRENT or _POSIX_VERSION) */
  349.      Using the above declarations, the program would declare variables
  350.      to be type `struct dirent', not `struct direct', and would access
  351.      the length of a directory entry name by passing a pointer to a
  352.      `struct dirent' to the `NLENGTH' macro.
  353. `AC_MAJOR_HEADER'
  354.      If `sys/types.h' does not define `major', `minor', and `makedev',
  355.      but `sys/mkdev.h' does, define `MAJOR_IN_MKDEV'; otherwise, if
  356.      `sys/sysmacros.h' does, define `MAJOR_IN_SYSMACROS'.
  357. `AC_MEMORY_H'
  358.      Define `NEED_MEMORY_H' if `memcpy', `memcmp', etc. are not
  359.      declared in `string.h' and `memory.h' exists.  This macro is
  360.      obsolete; instead, use `AC_HAVE_HEADERS(memory.h)'.  See the
  361.      example for `AC_STDC_HEADERS'.
  362. `AC_STDC_HEADERS'
  363.      Define `STDC_HEADERS' if the system has ANSI C header files.
  364.      Specifically, this macro checks for `stdlib.h', `stdarg.h',
  365.      `string.h', and `float.h'; if the system has those, it probably
  366.      has the rest of the ANSI C header files.  This macro also checks
  367.      whether `string.h' declares `memchr' (and thus presumably the
  368.      other `mem' functions) and whether the `ctype.h' macros work on
  369.      characters with the high bit set, as ANSI C requires.
  370.      Use `STDC_HEADERS' instead of `__STDC__' to determine whether the
  371.      system has ANSI-compliant header files (and probably C library
  372.      functions) because many systems that have GCC do not have ANSI C
  373.      header files.
  374.      To check whether to use the System V/ANSI C string functions and
  375.      header file, you can put the following in `configure.in':
  376.           AC_STDC_HEADERS
  377.           AC_HAVE_HEADERS(string.h memory.h)
  378.      Then, in the code, use a test like this:
  379.           #if STDC_HEADERS || HAVE_STRING_H
  380.           #include <string.h>
  381.           /* An ANSI string.h and pre-ANSI memory.h might conflict.  */
  382.           #if !STDC_HEADERS && HAVE_MEMORY_H
  383.           #include <memory.h>
  384.           #endif /* not STDC_HEADERS and HAVE_MEMORY_H */
  385.           #define index strchr
  386.           #define rindex strrchr
  387.           #define bcopy(s, d, n) memcpy ((d), (s), (n))
  388.           #define bcmp(s1, s2, n) memcmp ((s1), (s2), (n))
  389.           #define bzero(s, n) memset ((s), 0, (n))
  390.           #else /* not STDC_HEADERS and not HAVE_STRING_H */
  391.           #include <strings.h>
  392.           /* memory.h and strings.h conflict on some systems.  */
  393.           #endif /* not STDC_HEADERS and not HAVE_STRING_H */
  394.      This example asssumes that your code uses the BSD style functions.
  395.      If you use the System V/ANSI C style functions, you will need to
  396.      replace the macro definitions with ones that go in the other
  397.      direction.
  398. `AC_UNISTD_H'
  399.      Define `HAVE_UNISTD_H' if the system has `unistd.h'.  The way to
  400.      check if the system supports POSIX.1 is:
  401.           #if HAVE_UNISTD_H
  402.           #include <sys/types.h>
  403.           #include <unistd.h>
  404.           #endif
  405.           
  406.           #ifdef _POSIX_VERSION
  407.           /* Code for POSIX.1 systems.  */
  408.           #endif
  409.      `_POSIX_VERSION' is defined when `unistd.h' is included on POSIX.1
  410.      systems.  If there is no `unistd.h', it is definitely not a
  411.      POSIX.1 system.  However, some non-POSIX.1 systems do have
  412.      `unistd.h'.
  413. `AC_USG'
  414.      Define `USG' if the system does not have `strings.h', `rindex',
  415.      `bzero', etc.  This implies that it has `string.h', `strrchr',
  416.      `memset', etc.
  417.      The symbol `USG' is obsolete.  Instead of this macro, use
  418.      `AC_HAVE_HEADERS(string.h)' and use `HAVE_STRING_H' in your code.
  419.      See the example for `AC_STDC_HEADERS'.
  420. File: autoconf.info,  Node: Typedefs,  Next: Library Functions,  Prev: Header Files,  Up: Specific Tests
  421. Typedefs
  422. ========
  423.    The following macros check for predefined C types:
  424. `AC_GETGROUPS_T'
  425.      Define `GETGROUPS_T' to be whichever of `gid_t' or `int' is the
  426.      base type of the array argument to `getgroups'.
  427. `AC_MODE_T'
  428.      If `mode_t' is not defined in `sys/types.h', define `mode_t' to be
  429.      `int'.
  430. `AC_PID_T'
  431.      If `pid_t' is not defined in `sys/types.h', define `pid_t' to be
  432.      `int'.
  433. `AC_RETSIGTYPE'
  434.      If `signal.h' declares `signal' as returning a pointer to a
  435.      function returning `void', define `RETSIGTYPE' to be `void';
  436.      otherwise, define it to be `int'.
  437.      Define signal handlers as returning type `RETSIGTYPE':
  438.           RETSIGTYPE
  439.           hup_handler ()
  440.           {
  441.           ...
  442.           }
  443. `AC_SIZE_T'
  444.      If `size_t' is not defined in `sys/types.h', define `size_t' to be
  445.      `unsigned'.
  446. `AC_UID_T'
  447.      If `uid_t' is not defined in `sys/types.h', define `uid_t' to be
  448.      `int' and `gid_t' to be `int'.
  449. File: autoconf.info,  Node: Library Functions,  Next: Structures,  Prev: Typedefs,  Up: Specific Tests
  450. Library Functions
  451. =================
  452.    The following macros check for particular C library functions:
  453. `AC_ALLOCA'
  454.      Check how to get `alloca'.  Tries to get a builtin version by
  455.      checking for `alloca.h' or the predefined C preprocessor macros
  456.      `__GNUC__' and `_AIX'.  If that fails, it looks for a function in
  457.      the standard C library.  If that fails, it sets the `make'
  458.      variable `ALLOCA' to `alloca.o'.  This variable is separate from
  459.      `LIBOBJS' so multiple programs can share the value of `ALLOCA'
  460.      without needing to create an actual library.
  461.      If this macro finds `alloca.h', it defines `HAVE_ALLOCA_H'.
  462.      This macro does not try to get `alloca' from the SVR3 `libPW' or
  463.      the SVR4 `libucb' because those libraries contain some
  464.      incompatible functions that cause trouble.  Some versions do not
  465.      even contain `alloca' or contain a buggy version.  If you still
  466.      want to use their `alloca', use `ar' to extract `alloca.o' from
  467.      them instead of compiling `alloca.c'.
  468.      Source files that use `alloca' should start with a piece of code
  469.      like the following, to declare it properly.  Note that in some
  470.      versions of AIX, the declaration of `alloca' must precede
  471.      everything else except for comments and preprocessor directives.
  472.      The `#pragma' directive is indented so that pre-ANSI C compilers
  473.      will ignore it, rather than choke on it.
  474.           /* AIX requires this to be the first thing in the file. */
  475.           #ifdef __GNUC__
  476.           #define alloca __builtin_alloca
  477.           #else /* not __GNUC__ */
  478.           #if HAVE_ALLOCA_H
  479.           #include <alloca.h>
  480.           #else /* not HAVE_ALLOCA_H */
  481.           #ifdef _AIX
  482.            #pragma alloca
  483.           #else /* not _AIX */
  484.           char *alloca ();
  485.           #endif /* not _AIX */
  486.           #endif /* not HAVE_ALLOCA_H */
  487.           #endif /* not __GNUC__ */
  488. `AC_GETLOADAVG'
  489.      Check how to get the system load averages.  It tries to get the
  490.      `getloadavg' function from `/usr/lib/libutils.a', if present (such
  491.      as on 4.4BSD), or from `/usr/lib/libgetloadavg.a' or
  492.      `/usr/local/lib/libgetloadavg.a' (such as is commonly installed on
  493.      AIX systems).  Otherwise, it adds `getloadavg.o' to the `make'
  494.      variable `LIBOBJS' and defines `SVR4', `DGUX', `UMAX', or
  495.      `UMAX4_3' if on those systems.  It then checks for `nlist.h'.  If
  496.      it finds it, it defines `NLIST_STRUCT' and checks whether `struct
  497.      nlist' has an `n_un' member; if so, it defines `NLIST_NAME_UNION'.
  498.      Then it determines whether compiling `getloadavg.c' would define
  499.      the `LDAV_PRIVILEGED'; this indicates whether the program will
  500.      need to be installed specially for `getloadavg' to work.  If so,
  501.      it defines `GETLOADAVG_PRIVILEGED'.  It always defines the `make'
  502.      variable `NEED_SETGID'; the value is `true' if special
  503.      installation is required, or `false' if not.  If `NEED_SETGID' is
  504.      defined to `true', the `make' variable `KMEM_GROUP' is also
  505.      defined to be the special group which should own the installed
  506.      program.
  507. `AC_SETVBUF_REVERSED'
  508.      If `setvbuf' takes the buffering type as its second argument and
  509.      the buffer pointer as the third, instead of the other way around,
  510.      define `SETVBUF_REVERSED'.  This is the case on System V before
  511.      release 3.
  512. `AC_STRCOLL'
  513.      Check for a proper declaration of the `strcoll' function.  This
  514.      does a bit more than `AC_HAVE_FUNCS(strcoll)', because some systems
  515.      have incorrect definitions of `strcoll', which should not be used.
  516. `AC_UTIME_NULL'
  517.      If `utime(FILE, NULL)' sets FILE's timestamp to the present,
  518.      define `HAVE_UTIME_NULL'.
  519. `AC_VFORK'
  520.      If `vfork.h' is found, define `HAVE_VFORK_H'.  If a working
  521.      `vfork' is not found, define `vfork' to be `fork'.  This macro
  522.      checks for several known errors in implementations of `vfork' and
  523.      considers the system to not have a working `vfork' if it detects
  524.      any of them.
  525. `AC_VPRINTF'
  526.      If `vprintf' is found, define `HAVE_VPRINTF'.  Otherwise, if
  527.      `_doprnt' is found, define `HAVE_DOPRNT'.
  528. `AC_WAIT3'
  529.      If `wait3' is found and fills in the contents of its third argument
  530.      (a `struct rusage *'), which HP-UX does not do, define
  531.      `HAVE_WAIT3'.
  532. File: autoconf.info,  Node: Structures,  Next: Compiler Characteristics,  Prev: Library Functions,  Up: Specific Tests
  533. Structures
  534. ==========
  535.    The following macros check for certain structures or structure
  536. members:
  537. `AC_ST_BLKSIZE'
  538.      If `struct stat' contains an `st_blksize' member, define
  539.      `HAVE_ST_BLKSIZE'.
  540. `AC_ST_BLOCKS'
  541.      If `struct stat' contains an `st_blocks' member, define
  542.      `HAVE_ST_BLOCKS'.  Otherwise, add `fileblocks.o' to the `make'
  543.      variable `LIBOBJS'.
  544. `AC_ST_RDEV'
  545.      If `struct stat' contains an `st_rdev' member, define
  546.      `HAVE_ST_RDEV'.
  547. `AC_TIME_WITH_SYS_TIME'
  548.      If a program may include both `time.h' and `sys/time.h', define
  549.      `TIME_WITH_SYS_TIME'.  On some older systems `sys/time.h' includes
  550.      `time.h', but `time.h' is not protected against multiple
  551.      inclusion, so programs should not explicitly include both files.
  552.      This macro is useful in programs that use for example `struct
  553.      timeval' or `struct timezone' as well as `struct tm'.  It is best
  554.      used in conjunction with HAVE_SYS_TIME_H.
  555.           #ifdef TIME_WITH_SYS_TIME
  556.           #include <sys/time.h>
  557.           #include <time.h>
  558.           #else
  559.           #ifdef HAVE_SYS_TIME_H
  560.           #include <sys/time.h>
  561.           #else
  562.           #include <time.h>
  563.           #endif
  564.           #endif
  565. `AC_STRUCT_TM'
  566.      If `time.h' does not define `struct tm', define `TM_IN_SYS_TIME',
  567.      which means that including `sys/time.h' defines `struct tm'.
  568. `AC_TIMEZONE'
  569.      Figure out how to get the current timezone.  If `struct tm' has a
  570.      `tm_zone' member, define `HAVE_TM_ZONE'.  Otherwise, if the
  571.      external array `tzname' is found, define `HAVE_TZNAME'.  This
  572.      macro calls `AC_STRUCT_TM' if it hasn't been called already.
  573. File: autoconf.info,  Node: Compiler Characteristics,  Next: System Services,  Prev: Structures,  Up: Specific Tests
  574. Compiler Characteristics
  575. ========================
  576.    The following macros check for C compiler or machine architecture
  577. features:
  578. `AC_ARG_ARRAY'
  579.      If the address of an argument to a C function can not be used like
  580.      the start of an array, define `NO_ARG_ARRAY'.  This ability allows
  581.      a sequence of arguments with the same type to be accessed as if
  582.      they were an array of values.
  583. `AC_CROSS_CHECK'
  584.      If the C compiler being used does not produce executables that can
  585.      run on the system where `configure' is being run, set the shell
  586.      variable `cross_compiling' to 1.  This information can be used by
  587.      `AC_TEST_PROGRAM' to determine whether to take a default action
  588.      instead of trying to run a test program (*note General Tests::.).
  589. `AC_CHAR_UNSIGNED'
  590.      If the C type `char' is unsigned, define `__CHAR_UNSIGNED__',
  591.      unless the C compiler predefines it.
  592. `AC_CONST'
  593.      If the C compiler does not fully support the keyword `const',
  594.      define `const' to be empty.  Some C compilers that do not define
  595.      `__STDC__' do support `const'; some compilers that define
  596.      `__STDC__' do not completely support `const'.  Programs can simply
  597.      use `const' as if every C compiler supported it; for those that
  598.      don't, the `Makefile' or configuration header file will define it
  599.      as empty.
  600. `AC_INLINE'
  601.      If the C compiler is a version of GCC that supports the keyword
  602.      `__inline' but not `inline' (such as some NeXT versions), define
  603.      `inline' to be `__inline'.  This macro calls `AC_PROG_CC' if it
  604.      hasn't been called already.
  605. `AC_INT_16_BITS'
  606.      If the C type `int' is smaller than the type `long', define
  607.      `INT_16_BITS'.
  608. `AC_LONG_DOUBLE'
  609.      If the C compiler supports the `long double' type, define
  610.      `HAVE_LONG_DOUBLE'.  Some C compilers that do not define
  611.      `__STDC__' do support the `long double' type; some compilers that
  612.      define `__STDC__' do not support `long double'.
  613. `AC_WORDS_BIGENDIAN'
  614.      If words are stored with the most significant byte first, define
  615.      `WORDS_BIGENDIAN'.
  616. File: autoconf.info,  Node: System Services,  Next: UNIX Variants,  Prev: Compiler Characteristics,  Up: Specific Tests
  617. System Services
  618. ===============
  619.    The following macros check for operating system services:
  620. `AC_HAVE_POUNDBANG(ACTION-IF-EXISTS [, ACTION-IF-NOT-EXISTS]])'
  621.      Prints `checking if `#!' works in shell scripts' to the standard
  622.      output, then creates sample shell scripts to determine whether
  623.      using lines of the form `#!/bin/csh' have any effect on what shell
  624.      is invoked to read the script.  ACTION-IF-EXISTS is a list of shell
  625.      commands to run if #! works; ACTION-IF-NOT-EXISTS is a list of
  626.      shell commands to run otherwise.  There are no default actions.
  627. `AC_LONG_FILE_NAMES'
  628.      If the system supports file names longer than 14 characters, define
  629.      `HAVE_LONG_FILE_NAMES'.
  630. `AC_REMOTE_TAPE'
  631.      If BSD tape drive ioctls are available, define `HAVE_SYS_MTIO_H',
  632.      and if sockets are available add `rmt' to `make' variable `PROGS'.
  633. `AC_RESTARTABLE_SYSCALLS'
  634.      If the system automatically restarts a system call that is
  635.      interrupted by a signal, define `HAVE_RESTARTABLE_SYSCALLS'.
  636. File: autoconf.info,  Node: UNIX Variants,  Prev: System Services,  Up: Specific Tests
  637. UNIX Variants
  638. =============
  639.    The following macros check for certain operating systems that need
  640. special treatment for some programs, due to exceptional oddities in
  641. their header files or libraries:
  642. `AC_AIX'
  643.      If on AIX, define `_ALL_SOURCE'.  Allows the use of some BSD
  644.      functions.  Should be called before any macros that run the C
  645.      compiler.
  646. `AC_DYNIX_SEQ'
  647.      If on DYNIX/ptx (Sequent UNIX), add `-lseq' to `make' variable
  648.      `LIBS'.  Allows use of some BSD system calls and `getmntent'.
  649. `AC_IRIX_SUN'
  650.      If on IRIX (Silicon Graphics UNIX), add `-lsun' to `make' variable
  651.      `LIBS'.  Needed to get `getmntent'.
  652. `AC_ISC_POSIX'
  653.      If on a POSIXized ISC UNIX, define `_POSIX_SOURCE' and add
  654.      `-posix' (for the GNU C compiler) or `-Xp' (for other C compilers)
  655.      to `make' variable `CC'.  This allows the use of POSIX facilities.
  656.      Must be called after `AC_PROG_CC' and before any other macros
  657.      that run the C compiler.
  658. `AC_MINIX'
  659.      If on Minix, define `_MINIX' and `_POSIX_SOURCE' and define
  660.      `_POSIX_1_SOURCE' to be 2.  This allows the use of POSIX
  661.      facilities.  Should be called before any macros that run the C
  662.      compiler.
  663. `AC_SCO_INTL'
  664.      If on SCO UNIX, add `-lintl' to `make' variable `LIBS'.  Used to
  665.      get `strftime'.  It must be called before checking for `strftime'.
  666. `AC_XENIX_DIR'
  667.      If on Xenix, define `VOID_CLOSEDIR' and add `-lx' to `make'
  668.      variable `LIBS'.  Also, if `sys/ndir.h' is not being used, add
  669.      `-ldir' to `LIBS'.  Needed when using the directory reading
  670.      functions.  This macro must be called after `AC_DIR_HEADER'.
  671. File: autoconf.info,  Node: General Purpose Macros,  Next: Writing Macros,  Prev: Specific Tests,  Up: Top
  672. General Purpose Macros
  673. **********************
  674.    These macros provide ways for other macros to control the kind of
  675. output that Autoconf produces or to check whether various features are
  676. available.  They all take arguments.  When calling these macros, there
  677. must not be any blank space between the macro name and the open
  678. parentheses.
  679.    Arguments to these macros can be more than one line long if they are
  680. enclosed within the `m4' quote characters `[' and `]'.
  681.    Within each section below, the macros are listed in alphabetical
  682. order.  These macros are defined in the file `acgeneral.m4'.
  683. * Menu:
  684. * Setup::            Controlling Autoconf operation.
  685. * General Tests::        Check for kinds of features.
  686. * Setting Variables::        Setting shell and `make' variables.
  687. * Macro Ordering::        Enforcing ordering constraints.
  688. File: autoconf.info,  Node: Setup,  Next: General Tests,  Up: General Purpose Macros
  689. Controlling Autoconf Setup
  690. ==========================
  691.    The following macros control the kind of output that Autoconf
  692. produces.
  693. `AC_CONFIG_HEADER(HEADER-TO-CREATE)'
  694.      Create a file HEADER-TO-CREATE containing C preprocessor `#define'
  695.      statements instead of setting the `DEFS' variable in a `Makefile'.
  696.      This macro should be called right after `AC_INIT'.  Your
  697.      distribution should contain a file `HEADER-TO-CREATE.in' that
  698.      looks as you want the final header file to look, including
  699.      comments, with default values in the `#define' statements.  A
  700.      default value can be to `#undef' the variable instead of to define
  701.      it to a value, if your code tests for configuration options using
  702.      `#ifdef' instead of `#if'.
  703.      The usual name for the configuration header file is `config.h'.
  704.      Some GNU library routines contain
  705.           #ifdef HAVE_CONFIG_H
  706.           #include "config.h"
  707.           #endif
  708.      so if you use those routines, you should add `-DHAVE_CONFIG_H' to
  709.      CFLAGS in `Makefile.in' and call your configuration header file
  710.      `config.h'.  If you use `AC_CONFIG_HEADER', then `AC_OUTPUT'
  711.      replaces the string `@DEFS@' with `-DHAVE_CONFIG_H' instead of
  712.      with the value of `DEFS' (*note Setup::.).
  713.      You can use the program `autoheader' to create
  714.      `HEADER-TO-CREATE.in' (*note Invoking autoheader::.).
  715. `AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR)'
  716.      Process the command-line arguments and find the source code
  717.      directory.  UNIQUE-FILE-IN-SOURCE-DIR is some file that is in the
  718.      package's source directory; `configure' checks for this file's
  719.      existence to make sure that the directory that it is told contains
  720.      the source code in fact does (*note Running configure Scripts::.,
  721.      for more information).
  722. `AC_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR)'
  723.      Find the source code directory and set up shell variables
  724.      necessary for other Autoconf macros to work.
  725.      uNIQUE-FILE-IN-SOURCE-DIR is some file that is in the package's
  726.      source directory; `configure' checks for this file's existence to
  727.      make sure that the directory that it is told contains the source
  728.      code in fact does (*note Running configure Scripts::., for more
  729.      information).  `AC_PREPARE' is the last thing done by `AC_INIT'.
  730.      Use `AC_PREPARE' instead of `AC_INIT' if you want to do argument
  731.      parsing yourself; never use both.
  732. `AC_OUTPUT([FILE...])'
  733.      Create output files (typically one or more `Makefile's) and
  734.      `config.status'.  If `AC_CONFIG_HEADER' has been called, also
  735.      create the header file that was named as its argument.  The
  736.      argument is a whitespace-separated list of files to create; if it
  737.      is omitted, no files are created.  `AC_OUTPUT' creates each file
  738.      `FILE' in the list by copying `FILE.in', substituting the variable
  739.      values that have been selected by calling `AC_SUBST'.  It creates
  740.      the directory that each file is in if it doesn't exist (but not the
  741.      parents of that directory).  A plausible value for the argument to
  742.      `AC_OUTPUT' is `Makefile src/Makefile man/Makefile X/Imakefile'.
  743. File: autoconf.info,  Node: General Tests,  Next: Setting Variables,  Prev: Setup,  Up: General Purpose Macros
  744. Checking for Kinds of Features
  745. ==============================
  746.    These macros are templates that, when called with actual parameters,
  747. check for various kinds of features.  Many of these macros handle two
  748. cases: what to do if the given condition is met, and what to do if the
  749. condition is not met.  In some places you you might want to do something
  750. if a condition is true but do nothing if it's false, or vice versa.  To
  751. omit the true case, pass an empty value for the ACTION-IF-FOUND
  752. argument to the macro.  To omit the false case, omit the
  753. ACTION-IF-NOT-FOUND argument to the macro, including the comma before
  754.    One shell programming construction that you should not use in the
  755. action arguments to these macros is `VAR=${VAR:-VALUE}'.  Old BSD
  756. shells, including the Ultrix `sh', don't understand the colon, and
  757. complain and die.  If you omit the colon, it works fine:
  758. `VAR=${VAR-VALUE}'.
  759.    *Note Writing Macros::, for more information on how best to use these
  760. macros.
  761. `AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])'
  762.      Print `checking for ECHO-TEXT' to the standard output.  Then
  763.      create a test C program to see whether a function whose body
  764.      consists of FUNCTION-BODY can be compiled and linked; INCLUDES is
  765.      any `#include' statements needed by the code in FUNCTION-BODY.  If
  766.      the file compiles and links successfully, run shell commands
  767.      ACTION-IF-FOUND, otherwise run ACTION-IF-NOT-FOUND.  To include
  768.      double quotes in FUNCTION-BODY or INCLUDES, quote them with
  769.      backslashes.
  770. `AC_FUNC_CHECK(FUNCTION, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])'
  771.      If FUNCTION is available, run shell commands ACTION-IF-FOUND,
  772.      otherwise ACTION-IF-NOT-FOUND.
  773. `AC_HAVE_FUNCS(FUNCTION...)'
  774.      For each given FUNCTION in the whitespace-separated argument list
  775.      that is available, define `HAVE_FUNCTION' (in all caps).  *Note
  776.      Specific Tests::, for a precise definition of "define" as it is
  777.      used here.
  778.      To check whether a particular library exists, you can use the
  779.      `AC_HAVE_LIBRARY' macro.  If you need to check whether a library
  780.      other than the default C library actually contains a particular
  781.      function, temporarily change the shell variable `LIBS', which
  782.      contains a list of libraries to use when compiling test files.
  783.      Here is an example that checks whether the function `rint' is
  784.      present in the math library:
  785.           LIBS_save="$LIBS"
  786.           LIBS="$LIBS -lm"
  787.           AC_HAVE_FUNCS(rint)
  788.           LIBS="$LIBS_save"
  789.      Note that the above code does not decide whether to link the
  790.      program with `-lm'.
  791. `AC_HAVE_HEADERS(HEADER-FILE...)'
  792.      For each given HEADER-FILE in the whitespace-separated argument
  793.      list that exists, define `HAVE_HEADER-FILE' (in all caps).  *Note
  794.      Specific Tests::, for a precise definition of "define" as it is
  795.      used here.
  796. `AC_HAVE_LIBRARY(LIBRARY [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])'
  797.      Print `checking for LIBRARY' to the standard output.  Then create
  798.      a test C program to see whether that program can be linked with
  799.      the specified library.  ACTION-IF-FOUND is a list of shell
  800.      commands to run if the link succeeds (which means that the library
  801.      is present); ACTION-IF-NOT-FOUND is a list of shell commands to run
  802.      if the link fails.  If ACTION-IF-FOUND and ACTION-IF-NOT-FOUND are
  803.      not specified, the default action is to add `-lfoo' to `LIBS' and
  804.      define `HAVE_LIBfoo' for library `foo'.  LIBRARY can be written as
  805.      any of `foo', `-lfoo', or `libfoo.a'.  In all of those cases, the
  806.      compiler is passed `-lfoo'.
  807. `AC_HEADER_CHECK(HEADER-FILE, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])'
  808.      If HEADER-FILE exists, execute shell commands ACTION-IF-FOUND,
  809.      otherwise execute ACTION-IF-NOT-FOUND.
  810. `AC_HEADER_EGREP(PATTERN, HEADER-FILE, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])'
  811.      If the output of running the C preprocessor on HEADER-FILE
  812.      contains the `egrep' regular expression PATTERN, execute shell
  813.      commands ACTION-IF-FOUND, otherwise execute ACTION-IF-NOT-FOUND.
  814. `AC_PREFIX(PROGRAM)'
  815.      If the user did not specify an installation prefix on the command
  816.      line, guess a value for it by looking for PROGRAM in `PATH', the
  817.      way the shell does.  If PROGRAM is found, set the prefix to the
  818.      parent of the directory containing PROGRAM; otherwise leave the
  819.      prefix specified in `Makefile.in' unchanged.  For example, if
  820.      PROGRAM is `gcc' and the `PATH' contains `/usr/local/gnu/bin/gcc',
  821.      set the prefix to `/usr/local/gnu'.
  822. `AC_PROGRAM_CHECK(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND, VALUE-IF-NOT-FOUND)'
  823.      Check whether program PROG-TO-CHECK-FOR exists in `PATH'.  If it
  824.      is found, set VARIABLE to VALUE-IF-FOUND, otherwise to
  825.      VALUE-IF-NOT-FOUND.  Calls `AC_SUBST' for VARIABLE.
  826. `AC_PROGRAM_EGREP(PATTERN, PROGRAM, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])'
  827.      PROGRAM is the text of a C program, on which shell variable and
  828.      backquote substitutions are performed.  If the output of running
  829.      the C preprocessor on PROGRAM contains the `egrep' regular
  830.      expression PATTERN, execute shell commands ACTION-IF-FOUND,
  831.      otherwise execute ACTION-IF-NOT-FOUND.
  832. `AC_PROGRAMS_CHECK(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND])n'
  833.      Check for each program in the whitespace-separated list
  834.      PROGS-TO-CHECK-FOR exists in `PATH'.  If it is found, set VARIABLE
  835.      to the name of that program.  Otherwise, continue checking the
  836.      next program in the list.  If none of the programs in the list are
  837.      found, set VARIABLE to VALUE-IF-NOT-FOUND; if VALUE-IF-NOT-FOUND
  838.      is not specified, the value of VARIABLE will not be changed.
  839.      Calls `AC_SUBST' for VARIABLE.
  840. `AC_REPLACE_FUNCS(FUNCTION-NAME...)'
  841.      For each given FUNCTION-NAME in the whitespace-separated argument
  842.      list that is not in the C library, add `FUNCTION-NAME.o' to the
  843.      value of the `make' variable `LIBOBJS'.
  844. `AC_TEST_PROGRAM(PROGRAM, ACTION-IF-TRUE [, ACTION-IF-FALSE] [, ACTION-IF-CROSS-COMPILING])'
  845.      PROGRAM is the text of a C program, on which shell variable and
  846.      backquote substitutions are performed.  If it compiles and links
  847.      successfully and returns an exit status of 0 when executed, run
  848.      shell commands ACTION-IF-TRUE.  Otherwise run shell commands
  849.      ACTION-IF-FALSE.
  850.      If the optional argument ACTION-IF-CROSS-COMPILING is given and
  851.      the C compiler being used does not produce executables that run on
  852.      the system where `configure' is being run, then the test program
  853.      is not run.  Instead, the shell commands ACTION-IF-CROSS-COMPILING
  854.      are run.  If that argument is given, this macro calls
  855.      `AC_CROSS_CHECK' if it has not already been called (*note Compiler
  856.      Characteristics::.).
  857. `AC_TEST_CPP(INCLUDES, ACTION-IF-TRUE [, ACTION-IF-FALSE])'
  858.      INCLUDES is C `#include' statements and declarations, on which
  859.      shell variable and backquote substitutions are performed.
  860.      (Actually, it can be any C program, but other statements are
  861.      probably not useful.)  If the C preprocessor produces no error
  862.      messages while processing it, run shell commands ACTION-IF-TRUE.
  863.      Otherwise run shell commands ACTION-IF-FALSE.
  864.      This macro calls `AC_PROG_CPP' if it hasn't been called already.
  865. `AC_WITH(PACKAGE, ACTION-IF-TRUE [, ACTION-IF-FALSE])'
  866.      If the user gave `configure' the option `--with-PACKAGE', run
  867.      shell commands ACTION-IF-TRUE.  Otherwise run shell commands
  868.      ACTION-IF-FALSE.  The name PACKAGE should consist only of
  869.      alphanumeric characters and dashes; typical package names are
  870.      `gnu-libc' and `x'.
  871. File: autoconf.info,  Node: Setting Variables,  Next: Macro Ordering,  Prev: General Tests,  Up: General Purpose Macros
  872. Setting Variables
  873. =================
  874.    These macros help provide ways for other macros to define shell and
  875. `make' variables.
  876. `AC_DEFINE(VARIABLE [, VALUE])'
  877.      Define C preprocessor variable VARIABLE.  If VALUE is given, set
  878.      VARIABLE to that value, otherwise set it to 1.  To use a VALUE
  879.      containing double quotes, protect them with backslashes.
  880.      This macro adds to the shell variable `DEFS'.  `AC_OUTPUT' later
  881.      substitutes the values in `DEFS' into the `Makefile.in' file(s),
  882.      or if `AC_CONFIG_HEADER' has been called, into the header file
  883.      named as its argument.
  884.      `AC_OUTPUT' creates HEADER-TO-CREATE from `HEADER-TO-CREATE.in' by
  885.      substituting the correct values in `#define' statements.  For
  886.      example, suppose your `configure.in' calls
  887.      `AC_CONFIG_HEADER(conf.h)' and `AC_UNISTD_H'.  You could have code
  888.      like this in `conf.h.in':
  889.           /* Define as 1 if you have unistd.h.  */
  890.           #define HAVE_UNISTD_H 0
  891.      On systems that have `unistd.h', `configure' will change the 0 to
  892.      a 1.  On other systems, it will leave the line unchanged.
  893.      Alternately, if you prefer to use `#ifdef', your `conf.h.in' could
  894.      have code like this:
  895.           /* Define if you have unistd.h.  */
  896.           #undef HAVE_UNISTD_H
  897.      On systems that have `unistd.h', `configure' will change the
  898.      second line to read `#define HAVE_UNISTD_H 1'.  On other systems,
  899.      it will leave the line unchanged.
  900.      If HEADER-TO-CREATE already exists and its contents are identical
  901.      to what `AC_OUTPUT' would put in it, it is left alone.  Doing this
  902.      allows some changes in configuration without needlessly causing
  903.      object files that depend on the header file to be recompiled.
  904. `AC_DEFINE_UNQUOTED(VARIABLE [, VALUE])'
  905.      This is just like `AC_DEFINE', but it does nothing to quote VALUE
  906.      from various shell and `sed' expansions it will undergo.  VALUE
  907.      will be used in many different contexts requiring different
  908.      quoting, and it is up to you to make sure it works right.
  909. `AC_SUBST(VARIABLE)'
  910.      Substitute the variable VARIABLE when creating the output files
  911.      (typically one or more `Makefile's).  This means replace instances
  912.      of `@VARIABLE@', e.g. in `Makefile.in', with the current value of
  913.      the shell variable VARIABLE.  If this macro were not called, the
  914.      value of VARIABLE would not be set in the output files, even
  915.      though `configure' had figured out a value for it.
  916.      You can set or add to the value of VARIABLE in the usual shell
  917.      way.  For example, to add `-ltermcap' to the value of the variable
  918.      `LIBS':
  919.           LIBS="$LIBS -ltermcap"
  920. File: autoconf.info,  Node: Macro Ordering,  Prev: Setting Variables,  Up: General Purpose Macros
  921. Macro Ordering
  922. ==============
  923.    These macros provide ways for other macros to make sure that they are
  924. called in the correct order.
  925. `AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)'
  926.      Make `m4' print a warning message on the standard error output if
  927.      CALLED-MACRO-NAME has already been called.  THIS-MACRO-NAME should
  928.      be the name of the macro that is calling `AC_BEFORE'.  The macro
  929.      CALLED-MACRO-NAME must contain a call to `AC_PROVIDE' to indicate
  930.      that it has been called.
  931.      This macro should be used when one macro makes changes that might
  932.      affect another macro, so that the other macro should probably not
  933.      be called first.  For example, `AC_PROG_CPP' checks whether the C
  934.      compiler can run the C preprocessor when given the `-E' option.
  935.      It should therefore be called after any macros that change which C
  936.      compiler is being used, such as `AC_PROG_CC'.  So `AC_PROG_CC'
  937.      contains:
  938.           AC_BEFORE([$0], [AC_PROG_CPP])
  939.      This warns the user if a call to `AC_PROG_CPP' has already occurred
  940.      when `AC_PROG_CC' is called.
  941. `AC_PROVIDE(MACRO-NAME)'
  942.      Set a flag recording that MACRO-NAME has been called.  The
  943.      argument should be the name of the macro that is calling
  944.      `AC_PROVIDE'.  An easy way to get it is from the `m4' builtin
  945.      variable `$0', like this:
  946.           AC_PROVIDE([$0])
  947. `AC_REQUIRE(MACRO-NAME)'
  948.      If the `m4' macro MACRO-NAME has not already been called, call it
  949.      (without any arguments).  Make sure to quote MACRO-NAME with
  950.      square brackets.  The body of MACRO-NAME must contain a call to
  951.      `AC_PROVIDE' to indicate that it has been called.
  952.      Macros that need some other macro to be called before they are
  953.      called can use `AC_REQUIRE' to ensure that it has been, in case
  954.      the person who made `configure.in' forgot or didn't know to do it.
  955.      `AC_REQUIRE' and `AC_PROVIDE' together can ensure that a macro is
  956.      only called if it is needed, and only called once.  *Note
  957.      Dependencies Between Macros::, for more information.
  958. File: autoconf.info,  Node: Writing Macros,  Next: Makefiles,  Prev: General Purpose Macros,  Up: Top
  959. Writing Macros
  960. **************
  961.    If your package needs to test for some feature that none of the
  962. macros supplied with Autoconf handles, you'll need to write one or more
  963. new Autoconf macros.  Here are some suggestions and some of the
  964. rationale behind why the existing macros are written the way they are.
  965. You can also learn a lot about how to write Autoconf macros by looking
  966. at the existing ones.  If something goes wrong in one or more of the
  967. Autoconf tests, this information can help you understand why they work
  968. the way they do and the assumptions behind them, which might help you
  969. figure out how to best solve the problem.
  970.    If you add macros that you think would be useful to other people, or
  971. find problems with the distributed macros, please send electronic mail
  972. to `bug-gnu-utils@prep.ai.mit.edu', so we can consider them for future
  973. releases of Autoconf.  Please include the Autoconf version number,
  974. which you can get by running `autoconf --version'.
  975. * Menu:
  976. * Macro Format::        Basic format of an Autoconf macro.
  977. * Quoting::            Protecting macros from unwanted expansion.
  978. * Dependencies Between Macros::    What to do when macros depend on other macros.
  979. * Checking for Files::        Finding whether a file exists.
  980. * Checking for Symbols::    Finding whether a symbol is defined.
  981. * Test Programs::        Writing programs to test for features.
  982. * Multiple Cases::        Tests for several possible values.
  983. File: autoconf.info,  Node: Macro Format,  Next: Quoting,  Up: Writing Macros
  984. Macro Format
  985. ============
  986.    Autoconf macros are defined as arguments to the `m4' builtin command
  987. `define'.  Their overall structure looks like this:
  988.      define(MACRO-NAME, [MACRO-BODY])dnl
  989. The square brackets here do not indicate optional text: they should
  990. literally be present in the macro definition.
  991.    All of the Autoconf macros have names starting with `AC_' to prevent
  992. them from accidentally conflicting with other text.  You should prefix
  993. your own macro names with some other sequence, such as your initials or
  994. an abbreviation for the name of your organization or software package,
  995. to ensure that their names don't conflict with the names of present or
  996. future Autoconf macros.
  997.    The `m4' builtin `dnl' prevents a newline from being inserted in the
  998. output where the macro is defined; without it, the generated
  999. `configure' script would begin with dozens of blank lines.  `dnl' is
  1000. also used to introduce comments in `m4'; it causes `m4' to discard the
  1001. rest of the input line.
  1002.    You should quote the entire macro body with square brackets to avoid
  1003. macro expansion problems (*note Quoting::.).  You can refer to any
  1004. arguments passed to the macro as `$1', `$2', etc.
  1005.    *Note How to define new macros: (m4.info)Definitions, for more
  1006. complete information on writing `m4' macros.
  1007. File: autoconf.info,  Node: Quoting,  Next: Dependencies Between Macros,  Prev: Macro Format,  Up: Writing Macros
  1008. Quoting
  1009. =======
  1010.    Macros that are called by other macros are evaluated by `m4' several
  1011. times; each evaluation might require another layer of quotes to prevent
  1012. unwanted expansions of macros or `m4' builtins, such as `include' and
  1013. `$1'.  Quotes are also required around macro arguments that contain
  1014. commas, since commas separate the arguments from each other.
  1015.    Autoconf (in `acgeneral.m4') changes the `m4' quote characters from
  1016. the default ``' and `'' to `[' and `]', because many of the macros use
  1017. ``' and `'', mismatched.  However, in a few places the macros need to
  1018. use brackets.  In those places, they use the `m4' builtin command
  1019. `changequote' to temporarily disable quoting before the code that uses
  1020. brackets, like this:
  1021.      changequote(,)dnl
  1022. Then they turn quoting back on again with another call to `changequote':
  1023.      changequote([,])dnl
  1024.    When you create a `configure' script using newly written macros,
  1025. examine it carefully to check whether you need to add more quotes in
  1026. your macros.  If one or more words have disappeared in the `m4' output,
  1027. you need more quotes.  When in doubt, quote.
  1028.    However, it's also possible to put on too many layers of quotes.  If
  1029. this happens, the resulting `configure' script will contain unexpanded
  1030. macros.  The `autoconf' program checks for this problem by doing `grep
  1031. AC_ configure'.
  1032. File: autoconf.info,  Node: Dependencies Between Macros,  Next: Checking for Files,  Prev: Quoting,  Up: Writing Macros
  1033. Dependencies Between Macros
  1034. ===========================
  1035.    Some Autoconf macros depend on other macros having been called first
  1036. in order to work correctly, or in some cases, to work at all.  Autoconf
  1037. provides a way to ensure that certain macros are called if needed and a
  1038. way to warn the user if macros are called in an order that might cause
  1039. incorrect operation.
  1040. * Menu:
  1041. * Prerequisite Macros::        Ensuring required information.
  1042. * Suggested Ordering::        Warning about possible ordering problems.
  1043. File: autoconf.info,  Node: Prerequisite Macros,  Next: Suggested Ordering,  Up: Dependencies Between Macros
  1044. Prerequisite Macros
  1045. -------------------
  1046.    A macro that you write might need to use values that have previously
  1047. been computed by other macros.  For example, if you write a new macro
  1048. that uses the C preprocessor, it depends on `AC_PROG_CPP' having been
  1049. called first to set the shell variable `CPP' (*note Alternative
  1050. Programs::.).
  1051.    Rather than forcing the user of the macros to keep track of all of
  1052. the dependencies between them, you can use the macros `AC_PROVIDE' and
  1053. `AC_REQUIRE' to do it automatically.  *Note Macro Ordering::, for more
  1054. information on their syntax.
  1055.    The new macro that runs the C preprocessor should contain, somewhere
  1056. before `CPP' is used, the statement
  1057.      AC_REQUIRE([AC_PROG_CPP])
  1058. and the macro `AC_PROG_CPP' should contain the statement (anywhere in
  1059. its body)
  1060.      AC_PROVIDE([$0])
  1061. Then, when the new macro is run, it will invoke `AC_PROG_CPP' if and
  1062. only if `AC_PROG_CPP' has not already been run.
  1063. File: autoconf.info,  Node: Suggested Ordering,  Prev: Prerequisite Macros,  Up: Dependencies Between Macros
  1064. Suggested Ordering
  1065. ------------------
  1066.    Some macros should be run before another macro if both are called,
  1067. but neither requires the other to be called.  For example, a macro like
  1068. `AC_AIX' that changes the behavior of the C compiler (*note UNIX
  1069. Variants::.) should be called before any macros that run the C compiler.
  1070. Many of these dependencies are noted in the documentation.
  1071.    Autoconf provides a way to warn users when macros with this kind of
  1072. dependency appear out of order in a `configure.in' file.  The warning
  1073. occurs when creating `configure' from `configure.in', not when running
  1074. `configure'.  It is not a fatal error; `configure' is created as usual.
  1075.    The `AC_BEFORE' macro causes `m4' to print a warning message on the
  1076. standard error output when a macro is used before another macro which
  1077. might change its behavior.  The macro which should come first should
  1078. contain a call to `AC_BEFORE' and the macro which should come later
  1079. should contain a call to `AC_PROVIDE'.
  1080.    For example, `AC_AIX' contains
  1081.      AC_BEFORE([$0], [AC_COMPILE_CHECK])
  1082. and `AC_COMPILE_CHECK' contains
  1083.      AC_PROVIDE([$0])
  1084. As a result, if `AC_AIX' is called after `AC_COMPILE_CHECK', it will
  1085. note that `AC_COMPILE_CHECK' has already been called and print a
  1086. warning message.
  1087. File: autoconf.info,  Node: Checking for Files,  Next: Checking for Symbols,  Prev: Dependencies Between Macros,  Up: Writing Macros
  1088. Checking for Files
  1089. ==================
  1090.    If you need to check whether a file other than a C header file
  1091. exists, use `test -f FILENAME'.  If you need to make multiple checks
  1092. using `test', combine them with the shell operators `&&' and `||'
  1093. instead of using the `test' operators `-a' and `-o'.  On System V, the
  1094. precedence of `-a' and `-o' is wrong relative to the unary operators;
  1095. consequently, POSIX does not specify them, so using them is
  1096. nonportable.  If you combine `&&' and `||' in the same statement, keep
  1097. in mind that they have equal precedence.
  1098.    Do not use `test -x', because 4.3BSD does not have it.  Use `test
  1099. -f' or `test -r' instead.
  1100. File: autoconf.info,  Node: Checking for Symbols,  Next: Test Programs,  Prev: Checking for Files,  Up: Writing Macros
  1101. Checking for Symbols
  1102. ====================
  1103.    If you need to check whether a symbol is defined in a C header file,
  1104. you can use `AC_HEADER_EGREP' if the symbol is not a C preprocessor
  1105. macro (*note General Tests::.), or compile a small test program that
  1106. includes the file and references the symbol (*note Test Programs::.).
  1107. Don't directly `grep' for the symbol in the file, because on some
  1108. systems it might be defined in another header file that the file you are
  1109. checking `#include's.
  1110.    However, if you need to check for a particular UNIX variant which is
  1111. distinguished by having certain text in a certain file, then use `grep'
  1112. (or `egrep').  But don't use `grep -s' to suppress output, because
  1113. `grep -s' on System V does not suppress output, only error messages.
  1114. Instead, redirect the standard output and standard error (in case the
  1115. file doesn't exist) of `grep' to `/dev/null'.  Check the exit status of
  1116. `grep' to determine whether it found a match.
  1117.    To check whether the Autoconf macros have already defined a certain C
  1118. preprocessor symbol, you can use a `case' statement like this:
  1119.      case "$DEFS" in
  1120.        *HAVE_FOO*) ;;
  1121.        *) LIBOBJS="$LIBOBJS foo.o" ;;
  1122.      esac
  1123. Make sure to enclose the variable name you are checking (usually
  1124. `DEFS') in double quotes, because otherwise some old versions of `bash'
  1125. misinterpret the statement.
  1126. File: autoconf.info,  Node: Test Programs,  Next: Multiple Cases,  Prev: Checking for Symbols,  Up: Writing Macros
  1127. Test Programs
  1128. =============
  1129.    Autoconf checks for many features by compiling small test programs.
  1130. To find out whether a library function is available, Autoconf tries to
  1131. compile a small program that uses it.  This is unlike Larry Wall's
  1132. Metaconfig, which uses `nm' or `ar' on the C library to try to figure
  1133. out which functions are available.  Trying to link with the function is
  1134. usually a more reliable and flexible approach because it avoids dealing
  1135. with the variations in the options and output formats of `nm' and `ar'
  1136. and in the location of the standard libraries.  It also allows
  1137. `configure' to check aspects of the function's runtime behavior if
  1138. needed.  On the other hand, it is sometimes slower than scanning the
  1139. libraries.
  1140.    If you need to check for a condition other than whether some symbol
  1141. exists on the system or has a certain value, then you can't use
  1142. `AC_COMPILE_CHECK' (*note General Tests::.).  You have to write a test
  1143. program by hand.  You can compile and run it using `AC_TEST_PROGRAM'
  1144. (*note General Tests::.).
  1145.    Try to avoid writing test programs if possible, because using them
  1146. prevents people from configuring your package for cross-compiling.  If
  1147. it's really best that you test for a run-time behavior, try to provide a
  1148. default "worst case" value to use when cross-compiling makes run-time
  1149. tests impossible.  You do this by passing the optional last argument to
  1150. `AC_TEST_PROGRAM'.
  1151. * Menu:
  1152. * Guidelines::            General rules for writing test programs.
  1153. * Tricks::            Special ways to work around problems.
  1154. File: autoconf.info,  Node: Guidelines,  Next: Tricks,  Up: Test Programs
  1155. Guidelines for Test Programs
  1156. ----------------------------
  1157.    Test programs should return 0 if the test succeeds, nonzero
  1158. otherwise, so that success can be distinguished easily from a core dump
  1159. or other failure; segmentation violations and other failures produce a
  1160. nonzero exit status.  Test programs should `exit', not `return', from
  1161. `main', because on some systems the argument to `return' in `main' is
  1162. ignored.  They should not write anything to the standard output.
  1163.    Test programs can use `#if' or `#ifdef' to check the values of
  1164. preprocessor macros defined by tests that have already run.  For
  1165. example, if you call `AC_STDC_HEADERS', then later on in `configure.in'
  1166. you can have a test program that includes an ANSI C header file
  1167. conditionally:
  1168.      #if STDC_HEADERS
  1169.      #include <stdlib.h>
  1170.      #endif
  1171.    If a test program needs to use or create a data file, give it a name
  1172. that starts with `conftest', such as `conftestdata'.  The `configure'
  1173. script cleans up by running `rm -f conftest*' after running test
  1174. programs and if the script is interrupted.
  1175. File: autoconf.info,  Node: Tricks,  Prev: Guidelines,  Up: Test Programs
  1176. Tricks for Test Programs
  1177. ------------------------
  1178.    If a test program calls a function with invalid parameters (just to
  1179. see whether it exists), organize the program to ensure that it never
  1180. invokes that function.  You can do this by calling it in another
  1181. function that is never invoked.  You can't do it by putting it after a
  1182. call to `exit', because GCC version 2 knows that `exit' never returns
  1183. and optimizes out any code that follows it in the same block.
  1184.    If you include any header files, make sure to call the functions
  1185. relevant to them with the correct number of arguments, even if they are
  1186. just 0, to avoid compilation errors due to prototypes.  GCC version 2
  1187. has internal prototypes for several functions that it automatically
  1188. inlines; for example, `memcpy'.  To avoid errors when checking for
  1189. them, either pass them the correct number of arguments or redeclare them
  1190. with a different return type (such as `char').
  1191. File: autoconf.info,  Node: Multiple Cases,  Prev: Test Programs,  Up: Writing Macros
  1192. Multiple Cases
  1193. ==============
  1194.    Some operations are accomplished in several possible ways, depending
  1195. on the UNIX variant.  Checking for them essentially requires a "case
  1196. statement".  Autoconf does not directly provide one; however, it is
  1197. easy to simulate by using a shell variable to keep track of whether a
  1198. way to perform the operation has been found yet.
  1199.    Here is an example excerpted from the `configure.in' for GNU `find'.
  1200. It uses the shell variable `fstype' to keep track of whether the
  1201. remaining cases need to be checked.  There are several more cases which
  1202. are not shown here but follow the same pattern.
  1203.      echo checking how to get filesystem type
  1204.      # SVR4.
  1205.      AC_TEST_CPP([#include <sys/statvfs.h>
  1206.      #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=1)
  1207.      if test -z "$fstype"; then
  1208.      # SVR3.
  1209.      AC_TEST_CPP([#include <sys/statfs.h>
  1210.      #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=1)
  1211.      fi
  1212.      if test -z "$fstype"; then
  1213.      # AIX.
  1214.      AC_TEST_CPP([#include <sys/statfs.h>
  1215.      #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=1)
  1216.      fi
  1217. File: autoconf.info,  Node: Makefiles,  Next: Running configure Scripts,  Prev: Writing Macros,  Up: Top
  1218. Makefiles
  1219. *********
  1220.    Each subdirectory in a distribution should come with a file
  1221. `Makefile.in', from which `configure' will produce a `Makefile' in that
  1222. directory.  Most of the substitutions that `configure' does are simple:
  1223. for each configuration variable that the package uses, it just replaces
  1224. occurrences of `@VARIABLE@' with the value that `configure' has
  1225. determined for that variable.  Any occurrences of `@VARIABLE@' for
  1226. variables that `configure' does not know about are passed through
  1227. unchanged.
  1228.    There is no point in checking for the correct value to give a
  1229. variable that is never used.  Every variable that the `configure' script
  1230. might set a value for should appear in a `@VARIABLE@' reference in at
  1231. least one `Makefile.in'.  If `AC_CONFIG_HEADER' is called, `configure'
  1232. replaces `@DEFS@' with `-DHAVE_CONFIG_H', since the contents of `DEFS'
  1233. would be redundant.
  1234.    *Note Makefile Conventions: (standards.info)Makefiles, for more
  1235. information on what to put in Makefiles.  *Note Sample Makefile.in::,
  1236. for an example of a real `Makefile.in'.
  1237. * Menu:
  1238. * Predefined Variables::    Heavily used `make' variables.
  1239. * Installation Prefixes::    A special variable substitution.
  1240. * VPATH Substitutions::        Compiling in a different directory.
  1241. * Automatic Remaking::        Makefile rules for configuring.
  1242. File: autoconf.info,  Node: Predefined Variables,  Next: Installation Prefixes,  Up: Makefiles
  1243. Predefined Variables
  1244. ====================
  1245.    Some `make' variables are predefined by the Autoconf macros.
  1246. `AC_SUBST' is called for them automatically (*note Setting
  1247. Variables::.), so in your `Makefile.in' files you can get their values
  1248. by enclosing their names in `@' characters (*note Makefiles::.).  The
  1249. variables that are defined by the general purpose Autoconf macros are:
  1250. `srcdir'
  1251.      The directory that contains the source code for that `Makefile'.
  1252. `DEFS'
  1253.      `-D' options to pass to the C compiler.  Do not include `@DEFS@'
  1254.      in your `Makefile.in' files if you are using `AC_CONFIG_HEADER'.
  1255. `LIBS'
  1256.      `-l' and `-L' options to pass to the linker.
  1257. `LIBOBJS'
  1258.      Names of object files (ending in `.o').  Set by `AC_REPLACE_FUNCS'
  1259.      (*note General Tests::.).
  1260. File: autoconf.info,  Node: Installation Prefixes,  Next: VPATH Substitutions,  Prev: Predefined Variables,  Up: Makefiles
  1261. Installation Prefixes
  1262. =====================
  1263.    If `configure' has figured out a value for the installation prefix,
  1264. either by the user supplying one on the command line (*note Running
  1265. configure Scripts::.) or with `AC_PREFIX', then it substitutes that
  1266. value in `Makefile's that it creates.  Wherever a `Makefile.in'
  1267. contains a line like
  1268.      prefix = /usr/local
  1269. `configure' substitutes the value it figured out.  The word `prefix'
  1270. must not be preceded by any other characters on the line.
  1271.    There can be separate installation prefixes for architecture-specific
  1272. files and architecture-independent files *note Running configure
  1273. Scripts::.).  `configure' substitutes the word `exec_prefix' in the
  1274. same way that it does `prefix'.
  1275. File: autoconf.info,  Node: VPATH Substitutions,  Next: Automatic Remaking,  Prev: Installation Prefixes,  Up: Makefiles
  1276. `VPATH' Substitutions
  1277. =====================
  1278.    You might want to compile a software package in a different directory
  1279. from the one that contains the source code.  Doing this allows you to
  1280. compile the package for several architectures simultaneously from the
  1281. same copy of the source code and keep multiple sets of object files on
  1282. disk.
  1283.    To support doing this, `make' uses the `VPATH' variable to find the
  1284. files that are in the source directory.  GNU `make' and most other
  1285. recent `make' programs can do this.  Older `make' programs do not
  1286. support `VPATH'; when using them, the source code must be in the same
  1287. directory as the object files.
  1288.    To support `VPATH', each `Makefile.in' should contain two lines that
  1289. look like:
  1290.      srcdir = @srcdir@
  1291.      VPATH = @srcdir@
  1292.    Do not set `VPATH' to the value of another variable, for example
  1293. `VPATH = $(srcdir)', because some versions of `make' do not do variable
  1294. substitutions on the value of `VPATH'.
  1295.    `configure' substitutes in the correct value for `srcdir' when it
  1296. produces `Makefile.in'.
  1297.    Do not use the `make' variable `$<', which expands to the pathname
  1298. of the file in the source directory (found with `VPATH'), except in
  1299. implicit rules.  (An implicit rule is one such as `.c.o', which tells
  1300. how to create a `.o' file from a `.c' file.)  Some versions of `make'
  1301. do not set `$<' in explicit rules; they expand it to an empty value.
  1302.    Instead, `Makefile' command lines should always refer to source
  1303. files by prefixing them with `$(srcdir)/'.  For example:
  1304.      time.info: time.texinfo
  1305.              makeinfo $(srcdir)/time.texinfo
  1306. File: autoconf.info,  Node: Automatic Remaking,  Prev: VPATH Substitutions,  Up: Makefiles
  1307. Automatic Remaking
  1308. ==================
  1309.    You can put rules like the following in the top-level `Makefile.in'
  1310. for a package to automatically update the configuration information when
  1311. you change the configuration files.
  1312.    # The next rule also takes care of making config.h from config.h.in.
  1313. # If remaking config.h does not change it, its timestamp is untouched.
  1314. Makefile: Makefile.in config.status     $(SHELL) config.status
  1315. config.status: configure     $(SHELL) $(srcdir)/configure -no-create
  1316. configure: configure.in     cd $(srcdir); autoconf config.h.in:
  1317. configure.in     cd $(srcdir); autoheader
  1318. File: autoconf.info,  Node: Running configure Scripts,  Next: Example,  Prev: Makefiles,  Up: Top
  1319. Running `configure' Scripts
  1320. ***************************
  1321.    A software package that uses a `configure' script generated by
  1322. Autoconf should be distributed with a file `Makefile.in', but no
  1323. `Makefile'; that way, the user has to properly configure the package
  1324. for the local system before compiling it.  Normally, configuring
  1325. consists of simply doing a `cd' to the package's source code directory
  1326. and typing:
  1327.      configure
  1328.    If the `PATH' environment variable does not contain the directory
  1329. `.', the command is instead:
  1330.      ./configure
  1331.    Users running `csh' on old versions of System V might have to
  1332. explicitly run `sh' on `configure':
  1333.      sh configure
  1334.    Running `configure' takes a minute or two.  While it is running, it
  1335. prints some messages that tell what it is doing.  If you don't want to
  1336. see the messages, run `configure' with its standard output redirected
  1337. to `/dev/null'; for example, `./configure >/dev/null'.
  1338.    To compile the package in a different directory from the one
  1339. containing the source code, you must use a version of `make' that
  1340. supports the `VPATH' variable, such as GNU `make'.  `cd' to the
  1341. directory where you want the object files and executables to go and run
  1342. `configure'.  `configure' automatically checks for the source code in
  1343. the directory that `configure' is in and in `..'.  If for some reason
  1344. `configure' is not in the source code directory that you are
  1345. configuring, then it will report that it can't find the source code.
  1346. In that case, run `configure' with the option `--srcdir=DIR', where DIR
  1347. is the directory that contains the source code.
  1348.    By default, `make install' will install the package's files in
  1349. `/usr/local/bin', `/usr/local/man', etc.  You can specify an
  1350. installation prefix other than `/usr/local' by giving `configure' the
  1351. option `--prefix=PATH'.  Alternately, you can do so by giving a value
  1352. for the `prefix' variable when you run `make', e.g.,
  1353.      make prefix=/usr/gnu
  1354.    You can specify separate installation prefixes for machine-specific
  1355. files and machine-independent files.  If you give `configure' the
  1356. option `--exec-prefix=PATH' or set the `make' variable `exec_prefix' to
  1357. PATH, the package will use PATH as the prefix for installing programs
  1358. and libraries.  Normally, all files are installed using the same prefix.
  1359.    Another `configure' option is useful mainly in `Makefile' rules for
  1360. updating `config.status' and `Makefile'.  The `--no-create' option
  1361. figures out the configuration for your system and records it in
  1362. `config.status', without actually configuring the package (creating
  1363. `Makefile's and perhaps a configuration header file).  Later, you can
  1364. run `./config.status' to actually configure the package.  You can also
  1365. give `config.status' the `--recheck' option, which makes it re-run
  1366. `configure' with the same arguments you used before.  This option is
  1367. useful if you change `configure'.
  1368.    Some packages pay attention to `--with-PACKAGE' options to
  1369. `configure', where PACKAGE is something like `gnu-libc' or `x' (for X
  1370. windows).  The README should mention any `--with-' options that the
  1371. package recognizes.
  1372.    `configure' ignores any other arguments that you give it.
  1373.    On systems that require unusual options for compilation or linking
  1374. that the package's `configure' script does not know about, you can give
  1375. `configure' initial values for variables by setting them in the
  1376. environment.  In Bourne-compatible shells, you can do that on the
  1377. command line like this:
  1378.      CC='gcc -traditional' LIBS=-lposix ./configure
  1379.    The `make' variables that you might want to override with
  1380. environment variables when running `configure' are:
  1381.    (For these variables, any value given in the environment overrides
  1382. the value that `configure' would choose:)
  1383.      C compiler program.  The default is `cc', or `gcc' if `gcc' is in
  1384.      your `PATH'.
  1385. `INSTALL'
  1386.      Program to use to install files.  The default is `install' if you
  1387.      have it, `cp' otherwise.
  1388.    (For these variables, any value given in the environment is added to
  1389. the value that `configure' chooses:)
  1390. `DEFS'
  1391.      Configuration options, in the form `-Dfoo -Dbar...'.  Do not use
  1392.      this variable in packages that use `AC_CONFIG_HEADER'.
  1393. `LIBS'
  1394.      Libraries to link with, in the form `-lfoo -lbar...'.
  1395.    Of course, in the long term, most problems requiring manual
  1396. intervention should be fixed by updating either the Autoconf macros or
  1397. the `configure.in' file for that package.  *Note Making configure
  1398. Scripts::, for a discussion of that subject.
  1399. File: autoconf.info,  Node: Example,  Next: Preprocessor Symbol Index,  Prev: Running configure Scripts,  Up: Top
  1400. An Example
  1401. **********
  1402.    Here are sample `configure.in' and `Makefile.in' files, to give a
  1403. real illustration of using Autoconf.  They are from the GNU `cpio'
  1404. package, which also includes the `mt' and `rmt' programs.
  1405. * Menu:
  1406. * Sample configure.in::        An example of a `configure' template.
  1407. * Sample Makefile.in::        An example of a `Makefile' template.
  1408. File: autoconf.info,  Node: Sample configure.in,  Next: Sample Makefile.in,  Up: Example
  1409. Sample `configure.in'
  1410. =====================
  1411. Here is `configure.in' from GNU `cpio'.  Note the use of the `dnl'
  1412. macro after `AC_SUBST' to suppress an extra unwanted, though harmless,
  1413. newline in the generated `configure' script (because the `AC_SUBST'
  1414. macro does not produce any output where it is called).
  1415.      dnl Process this file with autoconf to produce a configure script.
  1416.      AC_INIT(cpio.h)
  1417.      PROGS="cpio"
  1418.      AC_SUBST(PROGS)dnl
  1419.      AC_PROG_CC
  1420.      AC_PROG_CPP
  1421.      AC_GCC_TRADITIONAL
  1422.      AC_PROG_INSTALL
  1423.      AC_AIX
  1424.      AC_MINIX
  1425.      AC_ISC_POSIX
  1426.      AC_RETSIGTYPE
  1427.      AC_MAJOR_HEADER
  1428.      AC_REMOTE_TAPE
  1429.      test -n "$have_mtio" && PROGS="$PROGS mt"
  1430.      AC_RSH
  1431.      AC_CONST
  1432.      AC_UID_T
  1433.      AC_STDC_HEADERS
  1434.      AC_UNISTD_H
  1435.      AC_HAVE_HEADERS(string.h fcntl.h utime.h)
  1436.      AC_REPLACE_FUNCS(bcopy mkdir strdup)
  1437.      AC_HAVE_FUNCS(strerror lchown)
  1438.      AC_VPRINTF
  1439.      AC_ALLOCA
  1440.      AC_XENIX_DIR
  1441.      AC_HAVE_LIBRARY(socket, [LIBS="$LIBS -lsocket"])
  1442.      AC_HAVE_LIBRARY(nsl, [LIBS="$LIBS -lnsl"])
  1443.      AC_OUTPUT(Makefile)
  1444. File: autoconf.info,  Node: Sample Makefile.in,  Prev: Sample configure.in,  Up: Example
  1445. Sample `Makefile.in'
  1446. ====================
  1447. Here is `Makefile.in' from GNU `cpio', with some irrelevant lines
  1448. omitted, for brevity.
  1449.      #### Start of system configuration section. ####
  1450.      
  1451.      srcdir = @srcdir@
  1452.      VPATH = @srcdir@
  1453.      
  1454.      CC = @CC@
  1455.      
  1456.      INSTALL = @INSTALL@
  1457.      INSTALL_PROGRAM = @INSTALL_PROGRAM@
  1458.      INSTALL_DATA = @INSTALL_DATA@
  1459.      
  1460.      DEFS = @DEFS@
  1461.      LIBS = @LIBS@
  1462.      RTAPELIB = @RTAPELIB@
  1463.      
  1464.      CFLAGS = -g
  1465.      LDFLAGS = -g
  1466.      
  1467.      prefix = /usr/local
  1468.      exec_prefix = $(prefix)
  1469.      binprefix =
  1470.      manprefix =
  1471.      
  1472.      bindir = $(exec_prefix)/bin
  1473.      libdir = /etc
  1474.      mandir = $(prefix)/man/man1
  1475.      manext = 1
  1476.      
  1477.      #### End of system configuration section. ####
  1478.      
  1479.      SHELL = /bin/sh
  1480.      
  1481.      SRCS = copyin.c copyout.c copypass.c dstring.c fnmatch.c global.c \
  1482.      main.c tar.c util.c error.c getopt.c getopt1.c filemode.c version.c \
  1483.      rtapelib.c dirname.c idcache.c makepath.c xmalloc.c stripslash.c \
  1484.      userspec.c xstrdup.c bcopy.c mkdir.c strdup.c
  1485.      OBJS = copyin.o copyout.o copypass.o dstring.o fnmatch.o global.o \
  1486.      main.o tar.o util.o error.o getopt.o getopt1.o filemode.o version.o \
  1487.      $(RTAPELIB) dirname.o idcache.o makepath.o xmalloc.o stripslash.o \
  1488.      userspec.o xstrdup.o @LIBOBJS@ @ALLOCA@
  1489.      # mt source files not shared with cpio.
  1490.      MT_SRCS = mt.c argmatch.c
  1491.      MT_OBJS = mt.o argmatch.o error.o getopt.o getopt1.o \
  1492.      xmalloc.o $(RTAPELIB) @ALLOCA@
  1493.      HDRS = cpio.h cpiohdr.h tar.h tarhdr.h dstring.h extern.h filetypes.h \
  1494.      system.h fnmatch.h getopt.h rmt.h
  1495.      DISTFILES = $(SRCS) $(HDRS) COPYING COPYING.LIB ChangeLog Makefile.in \
  1496.      README NEWS INSTALL cpio.1 mt.1 makefile.pc cpio.def cpio.cs \
  1497.      configure configure.in $(MT_SRCS) rmt.c tcexparg.c alloca.c
  1498.      
  1499.      all: @PROGS@
  1500.      
  1501.      .c.o:
  1502.              $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -I$(srcdir) $<
  1503.      
  1504.      install: all $(srcdir)/cpio.1 $(srcdir)/mt.1
  1505.              $(INSTALL_PROGRAM) cpio $(bindir)/$(binprefix)cpio
  1506.              test ! -f mt || $(INSTALL_PROGRAM) mt $(bindir)/$(binprefix)mt
  1507.              -test ! -f rmt || $(INSTALL_PROGRAM) rmt /etc/rmt
  1508.              $(INSTALL_DATA) $(srcdir)/cpio.1 $(mandir)/$(manprefix)cpio.$(manext)
  1509.              test ! -f mt || \
  1510.              $(INSTALL_DATA) $(srcdir)/mt.1 $(mandir)/$(manprefix)mt.$(manext)
  1511.      
  1512.      cpio: $(OBJS)
  1513.              $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  1514.      
  1515.      rmt: rmt.o
  1516.              $(CC) $(LDFLAGS) -o $@ rmt.o $(LIBS)
  1517.      
  1518.      mt: $(MT_OBJS)
  1519.              $(CC) $(LDFLAGS) -o $@ $(MT_OBJS) $(LIBS)
  1520.      
  1521.      TAGS: $(SRCS)
  1522.              etags $(SRCS)
  1523.      
  1524.      clean:
  1525.              rm -f cpio rmt mt *.o core
  1526.      
  1527.      mostlyclean: clean
  1528.      
  1529.      distclean: clean
  1530.              rm -f Makefile config.status
  1531.      
  1532.      realclean: distclean
  1533.              rm -f TAGS
  1534.      
  1535.      dist:
  1536.              echo cpio-`sed -e '/version_string/!d' \
  1537.              -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  1538.              rm -rf `cat .fname`
  1539.              mkdir `cat .fname`
  1540.              ln $(DISTFILES) `cat .fname`
  1541.              tar chZf `cat .fname`.tar.Z `cat .fname`
  1542.              rm -rf `cat .fname` .fname
  1543. File: autoconf.info,  Node: Preprocessor Symbol Index,  Next: Macro Index,  Prev: Example,  Up: Top
  1544. Preprocessor Symbol Index
  1545. *************************
  1546.    This is an alphabetical list of the C preprocessor symbols that the
  1547. Autoconf macros define.  To work with Autoconf, C source code needs to
  1548. use these names in `#if' directives.
  1549. * Menu:
  1550. * const:                                Compiler Characteristics.
  1551. * DECLARE_YYTEXT:                       Alternative Programs.
  1552. * DIRENT:                               Header Files.
  1553. * GETGROUPS_T:                          Typedefs.
  1554. * GETLODAVG_PRIVILEGED:                 Library Functions.
  1555. * gid_t:                                Typedefs.
  1556. * HAVE_FUNCTION:                        General Tests.
  1557. * HAVE_HEADER:                          General Tests.
  1558. * HAVE_ALLOCA_H:                        Library Functions.
  1559. * HAVE_CONFIG_H:                        Setup.
  1560. * HAVE_DOPRNT:                          Library Functions.
  1561. * HAVE_LONG_DOUBLE:                     Compiler Characteristics.
  1562. * HAVE_LONG_FILE_NAMES:                 System Services.
  1563. * HAVE_NETDB_H:                         Alternative Programs.
  1564. * HAVE_RESTARTABLE_SYSCALLS:            System Services.
  1565. * HAVE_STRCOLL:                         Library Functions.
  1566. * HAVE_ST_BLKSIZE:                      Structures.
  1567. * HAVE_ST_BLOCKS:                       Structures.
  1568. * HAVE_ST_RDEV:                         Structures.
  1569. * HAVE_SYS_MTIO_H:                      System Services.
  1570. * HAVE_TM_ZONE:                         Structures.
  1571. * HAVE_TZNAME:                          Structures.
  1572. * HAVE_UNISTD_H:                        Header Files.
  1573. * HAVE_UTIME_NULL:                      Library Functions.
  1574. * HAVE_VFORK_H:                         Library Functions.
  1575. * HAVE_VPRINTF:                         Library Functions.
  1576. * HAVE_WAIT3:                           Library Functions.
  1577. * inline:                               Compiler Characteristics.
  1578. * INT_16_BITS:                          Compiler Characteristics.
  1579. * MAJOR_IN_MKDEV:                       Header Files.
  1580. * MAJOR_IN_SYSMACROS:                   Header Files.
  1581. * mode_t:                               Typedefs.
  1582. * NDIR:                                 Header Files.
  1583. * NEED_MEMORY_H:                        Header Files.
  1584. * NEED_SETGID:                          Library Functions.
  1585. * NLIST_NAME_UNION:                     Library Functions.
  1586. * NLIST_STRUCT:                         Library Functions.
  1587. * NO_ARG_ARRAY:                         Compiler Characteristics.
  1588. * NO_MINUS_C_MINUS_O:                   Alternative Programs.
  1589. * NO_REMOTE:                            Alternative Programs.
  1590. * pid_t:                                Typedefs.
  1591. * RETSIGTYPE:                           Typedefs.
  1592. * SETVBUF_REVERSED:                     Library Functions.
  1593. * size_t:                               Typedefs.
  1594. * STDC_HEADERS:                         Header Files.
  1595. * SYSDIR:                               Header Files.
  1596. * SYSNDIR:                              Header Files.
  1597. * TIME_WITH_SYS_TIME:                   Structures.
  1598. * TM_IN_SYS_TIME:                       Structures.
  1599. * uid_t:                                Typedefs.
  1600. * USG:                                  Header Files.
  1601. * vfork:                                Library Functions.
  1602. * VOID_CLOSEDIR:                        UNIX Variants.
  1603. * VOID_CLOSEDIR:                        Header Files.
  1604. * WORDS_BIGENDIAN:                      Compiler Characteristics.
  1605. * _ALL_SOURCE:                          UNIX Variants.
  1606. * _MINIX:                               UNIX Variants.
  1607. * _POSIX_1_SOURCE:                      UNIX Variants.
  1608. * _POSIX_SOURCE:                        UNIX Variants.
  1609. * _POSIX_SOURCE:                        UNIX Variants.
  1610. * _POSIX_VERSION:                       Header Files.
  1611. * __CHAR_UNSIGNED__:                    Compiler Characteristics.
  1612. File: autoconf.info,  Node: Macro Index,  Prev: Preprocessor Symbol Index,  Up: Top
  1613. Macro Index
  1614. ***********
  1615.    This is an alphabetical list of the Autoconf macros.  To make the
  1616. list easier to use, the macros are listed without their preceding `AC_'.
  1617. * Menu:
  1618. * AIX:                                  UNIX Variants.
  1619. * ALLOCA:                               Library Functions.
  1620. * ARG_ARRAY:                            Compiler Characteristics.
  1621. * BEFORE:                               Macro Ordering.
  1622. * CHAR_UNSIGNED:                        Compiler Characteristics.
  1623. * COMPILE_CHECK:                        General Tests.
  1624. * CONFIG_HEADER:                        Setup.
  1625. * CONST:                                Compiler Characteristics.
  1626. * CROSS_CHECK:                          Compiler Characteristics.
  1627. * DECLARE_YYTEXT:                       Alternative Programs.
  1628. * DEFINE:                               Setting Variables.
  1629. * DEFINE_UNQUOTED:                      Setting Variables.
  1630. * DIR_HEADER:                           Header Files.
  1631. * DYNIX_SEQ:                            UNIX Variants.
  1632. * FUNC_CHECK:                           General Tests.
  1633. * GCC_TRADITIONAL:                      Alternative Programs.
  1634. * GETGROUPS_T:                          Typedefs.
  1635. * GETLOADAVG:                           Library Functions.
  1636. * HAVE_FUNCS:                           General Tests.
  1637. * HAVE_HEADERS:                         General Tests.
  1638. * HAVE_LIBRARY:                         General Tests.
  1639. * HAVE_LONG_DOUBLE:                     Compiler Characteristics.
  1640. * HAVE_POUNDBANG:                       System Services.
  1641. * HEADER_CHECK:                         General Tests.
  1642. * HEADER_EGREP:                         General Tests.
  1643. * INIT:                                 Setup.
  1644. * INLINE:                               Compiler Characteristics.
  1645. * INT_16_BITS:                          Compiler Characteristics.
  1646. * IRIX_SUN:                             UNIX Variants.
  1647. * ISC_POSIX:                            UNIX Variants.
  1648. * LN_S:                                 Alternative Programs.
  1649. * LONG_FILE_NAMES:                      System Services.
  1650. * MAJOR_HEADER:                         Header Files.
  1651. * MEMORY_H:                             Header Files.
  1652. * MINIX:                                UNIX Variants.
  1653. * MINUS_C_MINUS_O:                      Alternative Programs.
  1654. * MODE_T:                               Typedefs.
  1655. * OUTPUT:                               Setup.
  1656. * PID_T:                                Typedefs.
  1657. * PREFIX:                               General Tests.
  1658. * PREPARE:                              Setup.
  1659. * PROGRAMS_CHECK:                       General Tests.
  1660. * PROGRAM_CHECK:                        General Tests.
  1661. * PROGRAM_EGREP:                        General Tests.
  1662. * PROG_AWK:                             Alternative Programs.
  1663. * PROG_CC:                              Alternative Programs.
  1664. * PROG_CPP:                             Alternative Programs.
  1665. * PROG_INSTALL:                         Alternative Programs.
  1666. * PROG_LEX:                             Alternative Programs.
  1667. * PROG_RANLIB:                          Alternative Programs.
  1668. * PROG_YACC:                            Alternative Programs.
  1669. * PROVIDE:                              Macro Ordering.
  1670. * REMOTE_TAPE:                          System Services.
  1671. * REPLACE_FUNCS:                        General Tests.
  1672. * REQUIRE:                              Macro Ordering.
  1673. * RESTARTABLE_SYSCALLS:                 System Services.
  1674. * RETSIGTYPE:                           Typedefs.
  1675. * RSH:                                  Alternative Programs.
  1676. * SCO_INTL:                             UNIX Variants.
  1677. * SETVBUF_REVERSED:                     Library Functions.
  1678. * SIZE_T:                               Typedefs.
  1679. * STDC_HEADERS:                         Header Files.
  1680. * STRCOLL:                              Library Functions.
  1681. * STRUCT_TM:                            Structures.
  1682. * ST_BLKSIZE:                           Structures.
  1683. * ST_BLOCKS:                            Structures.
  1684. * ST_RDEV:                              Structures.
  1685. * SUBST:                                Setting Variables.
  1686. * TEST_CPP:                             General Tests.
  1687. * TEST_PROGRAM:                         General Tests.
  1688. * TIMEZONE:                             Structures.
  1689. * TIME_WITH_SYS_TIME:                   Structures.
  1690. * UID_T:                                Typedefs.
  1691. * UNISTD_H:                             Header Files.
  1692. * USG:                                  Header Files.
  1693. * UTIME_NULL:                           Library Functions.
  1694. * VFORK:                                Library Functions.
  1695. * VPRINTF:                              Library Functions.
  1696. * WAIT3:                                Library Functions.
  1697. * WITH:                                 General Tests.
  1698. * WORDS_BIGENDIAN:                      Compiler Characteristics.
  1699. * XENIX_DIR:                            UNIX Variants.
  1700. Tag Table:
  1701. Node: Top
  1702. Node: Introduction
  1703. Node: Distributing
  1704. Node: Making configure Scripts
  1705. Node: Writing configure.in
  1706. Node: Invoking autoconf
  1707. Node: Invoking autoheader
  1708. 12132
  1709. Node: Specific Tests
  1710. 13565
  1711. Node: Alternative Programs
  1712. 15229
  1713. Node: Header Files
  1714. 18189
  1715. Node: Typedefs
  1716. 23109
  1717. Node: Library Functions
  1718. 24175
  1719. Node: Structures
  1720. 28555
  1721. Node: Compiler Characteristics
  1722. 30319
  1723. Node: System Services
  1724. 32512
  1725. Node: UNIX Variants
  1726. 33657
  1727. Node: General Purpose Macros
  1728. 35365
  1729. Node: Setup
  1730. 36282
  1731. Node: General Tests
  1732. 39486
  1733. Node: Setting Variables
  1734. 47293
  1735. Node: Macro Ordering
  1736. 50082
  1737. Node: Writing Macros
  1738. 52235
  1739. Node: Macro Format
  1740. 53731
  1741. Node: Quoting
  1742. 55103
  1743. Node: Dependencies Between Macros
  1744. 56562
  1745. Node: Prerequisite Macros
  1746. 57183
  1747. Node: Suggested Ordering
  1748. 58232
  1749. Node: Checking for Files
  1750. 59611
  1751. Node: Checking for Symbols
  1752. 60397
  1753. Node: Test Programs
  1754. 61867
  1755. Node: Guidelines
  1756. 63516
  1757. Node: Tricks
  1758. 64658
  1759. Node: Multiple Cases
  1760. 65661
  1761. Node: Makefiles
  1762. 66865
  1763. Node: Predefined Variables
  1764. 68273
  1765. Node: Installation Prefixes
  1766. 69150
  1767. Node: VPATH Substitutions
  1768. 70007
  1769. Node: Automatic Remaking
  1770. 71725
  1771. Node: Running configure Scripts
  1772. 72409
  1773. Node: Example
  1774. 77005
  1775. Node: Sample configure.in
  1776. 77474
  1777. Node: Sample Makefile.in
  1778. 78617
  1779. Node: Preprocessor Symbol Index
  1780. 81913
  1781. Node: Macro Index
  1782. 85756
  1783. End Tag Table
  1784.